package main

import (
	"fmt"
	"my/go_draft/redis/config"

	"github.com/garyburd/redigo/redis"
)

const connectType = config.ConnectType
const ip = config.IP
const port = config.Port
const requirePass = config.RequirePass

func main() {
	var conn, _ = redis.Dial(connectType, ip+":"+port)
	defer conn.Close()
	conn.Do("auth", requirePass)
	conn.Do("set", "name", "hwang")
	name, _ := redis.String(conn.Do("get", "name"))
	fmt.Println(name)
	conn.Do("del", "name")
}
